home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / dpkg / info / gconf2.postinst < prev    next >
Encoding:
Text File  |  2009-03-18  |  1.3 KB  |  44 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. if [ "$1" != "configure" ] || dpkg --compare-versions "$2" lt 2.19.1-2; then
  5.     update-alternatives \
  6.     --install /usr/bin/gconftool gconftool /usr/bin/gconftool-2 25 \
  7.     --slave /usr/share/man/man1/gconftool.1.gz gconftool.1.gz \
  8.         /usr/share/man/man1/gconftool-2.1.gz
  9. fi
  10.  
  11.  
  12.  
  13. for GCONF_DIR in /var/lib/gconf/defaults \
  14.          /etc/gconf/gconf.xml.mandatory \
  15.          /etc/gconf/gconf.xml.defaults ; do
  16.   GCONF_TREE=$GCONF_DIR/%gconf-tree.xml
  17.   if [ ! -f "$GCONF_TREE" ]; then
  18.     gconf-merge-tree "$GCONF_DIR"
  19.     chmod 644 "$GCONF_TREE"
  20.     find "$GCONF_DIR" -mindepth 1 -maxdepth 1 -type d -exec rm -rf \{\} \;
  21.     rm -f "$GCONF_DIR/%gconf.xml"
  22.     SIGNAL_DAEMONS=yes
  23.   fi
  24. done
  25.  
  26. if [ -d /usr/share/gconf/schemas ]; then
  27.   if [ "$1" = configure ] && [ -z "$2" ] || [ ! -s /var/lib/gconf/defaults/%gconf-tree.xml ]; then
  28.     # First installation: rebuild the defaults database in case 
  29.     # of packages shipping schemas but not depending on gconf2
  30.     gconf-schemas --register-all
  31.     SIGNAL_DAEMONS=no
  32.   fi
  33. fi
  34. if [ -d /usr/share/gconf/defaults ] && [ ! -s /var/lib/gconf/debian.defaults/%gconf-tree.xml ]; then
  35.   # Same for the defaults
  36.   update-gconf-defaults
  37.   SIGNAL_DAEMONS=no
  38. fi
  39.  
  40. if [ "$SIGNAL_DAEMONS" = yes ]; then
  41.   # re-read gconf databases
  42.   kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
  43. fi
  44.